<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="java.sql.*" %>
<HTML>
<BODY>
<% 

String driver="com.mysql.jdbc.Driver";
String url="jdbc:mysql://localhost:3306"; 

String userid="root"; // 用户 
String passwd="mysql"; // 密码 

try{
Class.forName(driver);
}
catch(Exception e){
out.println(driver + ":make sure your JDBC in lib dir");
e.printStackTrace();
}

try {
Connection con=DriverManager.getConnection(url,userid,passwd);
if(!con.isClosed())
out.println(" nail it!");
con.close();
}
catch(SQLException SQLe){
out.println(" damn !");
}

%>

<ul>
<li><a href="web.jsp">web.jsp</a></li>
</ul>

</BODY>
</HTML>